#!/bin/bash


container_id=$1
pid=$(docker inspect -f '{{.State.Pid}}' ${container_id})

echo pid=$pid

mkdir -p /var/run/netns

ln -sfT /proc/$pid/ns/net /var/run/netns/$container_id

echo "# ip netns"
ip netns 


# refer doc:  https://www.baeldung.com/linux/docker-network-namespace-invisible
